/*
 * Project: BoboDesignPattern
 * 
 * File Created at 2019年2月6日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package mediator;

import java.util.HashMap;
import java.util.Map;

/**
 * @Type President
 * @Desc
 * @author 52489
 * @date 2019年2月6日
 * @Version V1.0
 */
public class President implements Mediator {
    private Map<String, Department> map = new HashMap<>();

    /*
     * (non-Javadoc)
     * 
     * @see mediator.Mediator#register(java.lang.String, mediator.Department)
     */
    @Override
    public void register(String dname, Department d) {
        map.put(dname, d);
    }

    /*
     * (non-Javadoc)
     * 
     * @see mediator.Mediator#commond(java.lang.String)
     */
    @Override
    public void commond(String dname) {
        map.get(dname).selfAction();
    }

}
